-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Top level Pipfile sys_platform markers should be transitive #5892
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. A few minor ideas...
markers = self._fold_markers(dependency_tree, comes_from) | ||
if markers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
markers = self._fold_markers(dependency_tree, comes_from) | |
if markers: | |
if markers := self._fold_markers(dependency_tree, comes_from): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can use the walrus operator, but it won't work in 3.7 so we essentially can hold this back until we drop 3.7, but I have mixed feelings about it with the open reports about hash collection against some private indexes. 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am fine to remain Walrus-less. My two freelance clients are both Python 3.11-only so I forgot about 3.7 in this case.
use walrus operator Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
This reverts commit b2205a6.
The issue
I want transitive platform locking to work better.
The fix
By following the resolution chain (where the package came from) we can get back to the Pipfile entry and apply the same sys_platform markers the user intended.
Additionally add a top level platform_machine specifier that works the same way.
Note: Adding directly to the markers will behave different with the pip resolver than adding them as distinct specifier keys in the Pipfile.
The checklist
news/
directory to describe this fix with the extension.bugfix.rst
,.feature.rst
,.behavior.rst
,.doc.rst
..vendor.rst
. or.trivial.rst
(this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.